package com.itheima.stock.pojo.domain;

import com.itheima.stock.pojo.entity.SysPermission;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 添加权限时回显权限树,仅仅显示目录和菜单 的数据封装
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class SysPermissionDomain {
    private Long id;
    private String title;
    private Integer level;

    public SysPermissionDomain(SysPermission sysPermission) {
        id = sysPermission.getId();
        title = sysPermission.getTitle();
        level = sysPermission.getType();
    }
}